# -*- coding = utf-8 -*-
# @Time    : 2025/3/12 上午9:08
# @Author  : yqk
# @File    : 判断和循环语句.py
# @Software: PyCharm

# 1.判断
"""
score = 88
if score >= 90 and score <= 100:
    print("优秀")
elif score >= 80 and score < 90:
    print("良好")
elif score >= 70 and score < 80:
    print("一般")
else:
    print("差")

"""
"""

import random

x = random.randint(0,2)  # 随机生成0,1,2三个数字

print(x)

"""



# 作业
"""

import random
print("请输入：剪刀（0）、石头（1）、布（2）")
a = int(input())
if a == 0:
    print("你输入的是剪刀（0）")
elif a == 1:
    print("你输入的是石头（1）")
elif a == 2:
    print("你输入的是布（2）")
else:
    print("你输入的数字有误")
x = random.randint(0,2)
print("随机生成的数字为%d" % x)
if a == x:
    print("平局")
elif a == 0 and x == 1:
    print("你输了")
elif a == 0 and x == 2:
    print("你赢了")
elif a == 1 and x == 0:
    print("你赢了")
elif a == 1 and x == 2:
    print("你输了")
elif a == 2 and x == 0:
    print("你输了")
elif a == 2 and x == 1:
    print("你赢了")


"""


# 2.循环

"""'
name = "chengdu"
for i in name:
    print(i,end="\t")

"""

"""
a = ["aa","bb","cc"]
for i in range(len(a)):
    print(i,a[i])

"""

'''

i = 0
while i < 5:
    print("当前是第%d次循环"%(i+1))
    print("i=%d"%i)
    i += 1

'''

''''

i = 0
while i < 30:
    i += 1
    print("-"*30)
    if i == 5:
        break
    print(i)

'''
'''

i = 0
while i < 30:
    i += 1
    print("-"*30)
    if i == 5:
        continue
    print(i)

'''


# 作业

'''
for i in range(1,10):
    for j in range(1,i+1):
        print("%d*%d=%d"%(i,j,i*j),end="\t")
    print()
'''
'''
i = 1
while i < 10:
    j = 1
    while j <= i:
        print("%d*%d=%d"%(i,j,i*j),end="\t")
        j += 1
    print()
    i += 1
'''
